home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / alib / csup / clib / getchar.c < prev    next >
C/C++ Source or Header  |  1994-02-15  |  190b  |  15 lines

  1. #include <clib/dos_protos.h>
  2.  
  3. extern stdin;
  4.  
  5. getchar()
  6. {
  7.     char    c[4];               /* with padding */
  8.  
  9.     if (Read (stdin, &c[0], 1) != 1) {
  10.     return (-1);
  11.     }
  12.  
  13.     return (c[0]);
  14. }
  15.